package com.slz3.business.module.configManagement.conIndexVideo.steward;

import com.slz3.business.frame.response.RR;
import com.slz3.business.frame.response.ResInfo;
import com.slz3.business.module.configManagement.conIndexVideo.domain.ConIndexVideo;
import com.slz3.business.module.configManagement.conIndexVideo.domain.ConIndexVideoCondition;
import org.springframework.web.reactive.function.server.ServerRequest;
import org.springframework.web.reactive.function.server.ServerResponse;
import reactor.core.publisher.Mono;

public class ConIndexVideoResAtomic {

    static Mono<ServerResponse> add_$ConIndexVideoUpdateLock(ServerRequest req, ConIndexVideo conIndexVideo) {
        return ConIndexVideoResSafeValid.add(req, conIndexVideo) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                ConIndexVideoResExecutor.add(req, conIndexVideo);
    }

    public static Mono<ServerResponse> delete_$ConIndexVideoUpdateLock(ServerRequest req, ConIndexVideoCondition conIndexVideoCondition) {
        return ConIndexVideoResSafeValid.delete(req, conIndexVideoCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                ConIndexVideoResExecutor.delete(req);
    }

    static Mono<ServerResponse> modify_$ConIndexVideoUpdateLock(ServerRequest req, ConIndexVideo conIndexVideo) {
        return ConIndexVideoResSafeValid.modify(req, conIndexVideo) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                ConIndexVideoResExecutor.modify(req, conIndexVideo);
    }

    static Mono<ServerResponse> info_$ConIndexVideoUpdateLock(ServerRequest req) {
        return ConIndexVideoResSafeValid.info(req) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                ConIndexVideoResExecutor.info(req);
    }

    public static Mono<ServerResponse> auditSubmit_$ConIndexVideoUpdateLock(ServerRequest req, ConIndexVideoCondition conIndexVideoCondition) {
        return ConIndexVideoResSafeValid.auditSubmit(req, conIndexVideoCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                ConIndexVideoResExecutor.auditSubmit(req);
    }

    public static Mono<ServerResponse> audit_$ConIndexVideoUpdateLock(ServerRequest req, ConIndexVideoCondition conIndexVideoCondition) {
        return ConIndexVideoResSafeValid.audit(req, conIndexVideoCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                ConIndexVideoResExecutor.audit(req);
    }

    public static Mono<ServerResponse> auditReject_$ConIndexVideoUpdateLock(ServerRequest req, ConIndexVideoCondition conIndexVideoCondition) {
        return ConIndexVideoResSafeValid.auditReject(req, conIndexVideoCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                ConIndexVideoResExecutor.auditReject(req);
    }


    public static Mono<ServerResponse> usingEnable_$ConIndexVideoUpdateLock(ServerRequest req, ConIndexVideoCondition conIndexVideoCondition) {
        return ConIndexVideoResSafeValid.usingEnable(req, conIndexVideoCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                ConIndexVideoResExecutor.usingEnable(req);
    }

    public static Mono<ServerResponse> usingDisable_$ConIndexVideoUpdateLock(ServerRequest req, ConIndexVideoCondition conIndexVideoCondition) {
        return ConIndexVideoResSafeValid.usingDisable(req, conIndexVideoCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                ConIndexVideoResExecutor.usingDisable(req);
    }
}
